x86: miscellaneous emulator adjustments
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 19 Aug 2009 12:02:31 +0000 (13:02 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 19 Aug 2009 12:02:31 +0000 (13:02 +0100)
commitc88b1e06d5ad6d24b5cb0cb6f80ae35d94002ef5
treea3e3c997f1f342b00d1e890b5627554e5cdf1e85
parentb2c296e1c5dcbcca103b5fcc3862de8a3faa99c3
x86: miscellaneous emulator adjustments

Defer fail_if()-s as much as possible (in favor of possibly generating
exceptions), and avoid generating exceptions when not strictly
necessary.

Avoid fail_if()-s for simple return code checks (making the code that
used them consistent with other, longer existing code).

Eliminate redundant generate_exception_if()-s checking lock_prefix
(which is already covered by the general check prior to decoding
operands).

Also fix the testing code to add PROT_EXEC for the mapping that is
intended to have instruction executed from.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
tools/tests/test_x86_emulator.c
xen/arch/x86/x86_emulate/x86_emulate.c